var zhu = document.querySelector('.ttyk>h6')
var dian = document.querySelector('.shou>input:nth-of-type(1)')
var duan = document.querySelector('.shou>input:nth-of-type(2)')
var mi = document.querySelector('.shou>input:nth-of-type(3)')
var yan = document.querySelector('.yan')
var num = 60;
yan.onclick=function(){
	if(dian.value.length==0){
		alert('手机号必须填写')
	}else if(dian.value.length!=11){
		alert('手机号格式错误')
	}else{
		
	var shi=setInterval(function(){
			num--;
			yan.innerHTML=num;
			if(num==0){
				clearInterval(shi);
				num=60;
				yan.innerHTML='重新获取验证码';
			}
		},100)
	}
}
zhu.onclick=function(){
	if(mi.value.length==0){
		alert('密码必须填写')
	}else if(mi.value.length<7&&mi.value.length>11){
		alert('密码长度必须为6到12位字符')
	}else{
		window.location.href='../page/../index.html'
	}
}